package com.ksyun.alert.service;

import com.ksyun.alert.biz.bo.immediate.ImmediateCalculateBO;
import com.ksyun.alert.dto.MetricDTO;
import com.ksyun.alert.entity.AlertRulesDO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 实时计算接口层
 * @author 蓝
 * @date 2024-5-11
 */
public interface CalculateImmediateService {

    /**
     * 解析规则和参数列表
     * @param givenMetricsList 参数列表
     * @param immediateRulesList 规则列表
     */
    ImmediateCalculateBO doResolveNow(List<MetricDTO> givenMetricsList, List<AlertRulesDO> immediateRulesList);

    /**
     * 执行即时计算
     * @param immediateCalculateBO 实时计算业务对象
     * @param alertRulesDO 告警规则表实体类
     */
     void doCalculateNow(ImmediateCalculateBO immediateCalculateBO, AlertRulesDO alertRulesDO);

}
